package com.xinpu.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xinpu.mapper.ApplyMapper;
import com.xinpu.service.ApplyService;
import com.xinpu.vo.ApplyVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ApplyServiceImpl implements ApplyService {

    @Autowired
    private ApplyMapper applyMapper;

    /**
     * @param page
     * @param size
     * @param tenantId
     * @return
     */
    @Override
    public IPage<ApplyVo> list(Integer page, Integer size, String tenantId, Integer type, String name, Integer did, String start, String over, Integer status) {
        return applyMapper.list(new Page<>(page, size), tenantId, type, name, did, start, over, status);
    }

    /**
     * @param id
     * @return
     */
    @Override
    public ApplyVo findById(Integer id) {
        return applyMapper.findById(id);
    }
}
